package handlers

import (
	"MBTIx/dba"
	"MBTIx/models"
	"net/http"

	"github.com/gin-gonic/gin"
	"github.com/jmoiron/sqlx"
)

func Get_allPersonality(c *gin.Context){
	db,_ := c.Get("db")

	var pers []models.Personality
	dba.GetAllPersonality(db.(*sqlx.DB),&pers)
	c.JSON(http.StatusOK,gin.H{
		"code":0,
		"data": gin.H{
			"pers": pers,
		},
	})
}